<include file="Public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
  <include file="Public/breadcrumb"/>
  <section class="content">
    <div class="container-fluid">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title"><i class="fa fa-list"></i>商家订单结算</h3>
        </div>
        <div class="panel-body">    
		<div class="navbar navbar-default">                    
            <form id="search-form2" class="navbar-form form-inline"  method="post" onsubmit="return false">
                  <label for="shop_name" class="control-label">店铺名称:</label>
                  <div class="input-group">
                    <input type="text" class="form-control" id="shop_name" placeholder="店铺名称" value="{$Think.request.shop_name}" name="shop_name" />
                  </div>

                   <div class="input-group margin">                    
                    <div class="input-group-addon">
                        结算时间<i class="fa fa-calendar"></i>
                    </div>
                       <input type="text" id="start_time" value="{$create_time}" name="create_time" class="form-control pull-right">
                  </div>                  
                <div class="form-group">
                    <button type="submit" onclick="ajax_get_table('search-form2',1)" id="button-filter search-order" class="btn btn-primary"
                            data-toggle='tooltip' data-original-title="筛选"><i class="fa fa-search"></i> 筛选</button>
                </div>
                </form>    
          </div>
                        
          <div id="ajax_return"> 
                 
          </div>
        </div>
      </div>
    </div>
    <!-- /.row --> 
  </section>
  <!-- /.content --> 
</div>
<!-- /.content-wrapper --> 
 <script>
     // 点击分页触发的事件
     $(document).ready(function(){
         ajax_get_table('search-form2',1);

     });

     // ajax 抓取页面
     function ajax_get_table(tab,page){
         cur_page = page; //当前页面 保存为全局变量
         $.ajax({
             type : "POST",
             url:"/index.php?s=/Admin/Shop/ajaxcapital/p/"+page,//+tab,
             data : $('#'+tab).serialize(),// 你的formid
             success: function(data){
                 $("#ajax_return").html('');
                 $("#ajax_return").append(data);
             }
         });
     }

 
$(document).ready(function() {
    var day = new Date();
    var startDate = day.getFullYear()+'/'+day.getMonth+'/'+day.getDay();
	$('#start_time').daterangepicker({
		format:"YYYY/MM/DD",
		singleDatePicker: false,
		showDropdowns: true,
		minDate:'2016/01/01',
		maxDate:'2030/01/01',
		startDate:startDate,
	    locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间',
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
	});
});
</script>
</body>
</html>